package com.android.awacs.wifi;

import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

public class WiFiScanIP {

	private ArrayList<String> list;
	private String ip;

	public WiFiScanIP(String ip) {
		this.ip = ip;
		this.list = new ArrayList<String>();
	}

	ArrayList<String> getReachable() {
		try {
			for (int i = 0; i < 255; i++) {
				WiFiPingIP testIP = new WiFiPingIP(this.ip + i, list);
				((Thread) testIP).start();
			}
			Thread.sleep(2000);
		} catch (InterruptedException ex) {
			Logger.getLogger(WiFiScanIP.class.getName()).log(Level.SEVERE, null, ex);
		}
		return this.list;
	}
}
